<!DOCTYPE html>
<svg>
  <!-- animate element is destructed before rect elements -->
  <animate xlink:href="#rect" attributeName="x" attributeType="XML" begin="0s" dur="10s" fill="freeze" from="0" to="100" />
  <g id="usetarget">
    <rect id="rect" x="10" y="10" width="10" height="10" fill="red"></rect>
  </g>
  <use xlink:href="#usetarget"></use>
</svg>
<p>Test passes if unloading this document does not fail ASSERTs on debug builds.</p>
<script>
// This test doesn't use js-test.js to avoid unexpected DOM references.
if (window.testRunner)
    testRunner.dumpAsText();
</script>
